home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Czytniki RSS / RSS Bandit 1.3.0.42 / RssBandit Installer.msi / _172FF5180BC61D3C6D240F14338A23AA / _13641E868BA445E7A8A79A000A45FD64 < prev    next >
Extensible Markup Language  |  2004-12-30  |  7KB  |  266 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/rss/1.0/" xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
  3. <xsl:output method="html"/>
  4.  
  5. <xsl:variable name="common-styles">
  6.     <style type="text/css">
  7.  
  8.     body {
  9.         background-color: white; 
  10.         color: black;
  11.         margin-top: 0px;
  12.         margin-bottom: 0px;
  13.         
  14.         font-family: Arial, Verdana, Geneva, Arial, Helvetica, sans-serif; }
  15.  
  16.     table.filmstrip {
  17.         width: 85%; }
  18.  
  19.     td.leftborder {
  20.         background-image: url('$IMAGEDIR$bg_film_left.gif');
  21.         width: 54px; }
  22.     
  23.     td.rightborder {
  24.         background-image: url('$IMAGEDIR$bg_film_right.gif');    
  25.         width: 59px; }
  26.  
  27.     td.filmframes { background-color: black; }
  28.     
  29.     span.nodescription { color: gray; }
  30.     
  31.     
  32.     div.newsitembreak {
  33.         background-color: black;
  34.         height: 20px;
  35.         margin: 0px 0px 0px 0px; }
  36.     
  37.     div.newspapertitle,
  38.     div.channeltitle,
  39.     div.newsitemtitle,
  40.     div.newsitemcontent,
  41.     div.newsitemheader,
  42.     div.newsitemfooter {
  43.         background-color: #FAFAFA; }
  44.     
  45.     div.newspapertitle,
  46.     div.channeltitle {
  47.         padding: 10px 10px 10px 10px; }
  48.     
  49.     div.newsitemtitle {
  50.         padding: 0px 10px 0px 10px; }
  51.     
  52.     div.newsitemcontent {
  53.         padding: 20px 30px 20px 30px; }
  54.     
  55.     div.newsitemheader,
  56.     div.newsitemfooter {
  57.         padding: 5px 10px 5px 10px; }
  58.     
  59.     div.newspapertitle,
  60.     div.channeltitle {
  61.         text-align: center;
  62.         font-weight: bold;
  63.         font-size: 140%;
  64.         background-color: black; }
  65.     
  66.     div.newsitemtitle {
  67.         font-weight: bold;
  68.         font-size: 100%; }
  69.     
  70.     div.newsitemheader,
  71.     div.newsitemfooter {
  72.         color: #545454;
  73.         text-align: right;
  74.         font-size: 75%; }
  75.     
  76.     div.newsitemcontent {
  77.         font-size: 80%; }
  78.     
  79.     div.newspapertitle { 
  80.         background-color: black;
  81.         color: yellow; }
  82.     
  83.     div.channeltitle a  { color: lime }
  84.     div.newsitemtitle a { color: blue; }
  85.     div.newsitemtitle a.read { color: black; }
  86.     div.newsitemtitle a.flagged { color: red; }
  87.     
  88.     div.channeltitle a:hover,
  89.     div.newsitemtitle a:hover,
  90.     div.newsitemtitle a.read:hover,
  91.     div.newsitemtitle a.flagged:hover  { color:blue; }
  92.     
  93.     a { 
  94.         color: black; }
  95.         
  96.     a:hover { 
  97.         color: blue; }
  98.         
  99.     a img { border: 1px; }
  100.     
  101.     h1,h2,h3,h4,h5,h6 { 
  102.         font-size: 85%; 
  103.         font-weight: bold; 
  104.         font-style: italic;    }
  105.     
  106.     blockquote {
  107.         margin-left: 5px; }
  108.     
  109.     code, 
  110.     pre, 
  111.     tt { 
  112.         font-family: "Courier New", Courier, monospace;
  113.         color: navy; }
  114.     </style>
  115. </xsl:variable>
  116.  
  117. <!-- newsitem  -->
  118. <xsl:template match="item">
  119.     <div class="newsitemheader">
  120.         <xsl:choose>
  121.             <xsl:when test="pubDate">Published: <xsl:value-of select="substring-before(pubDate,' GMT')" disable-output-escaping="yes"/>
  122.             </xsl:when>
  123.             <xsl:otherwise>
  124.                 <xsl:value-of select="fd:dateDisplay" disable-output-escaping="yes"/>
  125.             </xsl:otherwise>
  126.         </xsl:choose>
  127.     </div>
  128.     <div class="newsitemtitle">
  129.         <a href="{link}">
  130.             <xsl:attribute name="class"><xsl:choose><xsl:when test="fd:state[@flagged='1']">flagged</xsl:when><xsl:when test="fd:state[@read='1']">read</xsl:when></xsl:choose></xsl:attribute>
  131.             <xsl:value-of select="title" disable-output-escaping="yes"/>
  132.         </a>
  133.     </div>
  134.     <div class="newsitemcontent">
  135.         <xsl:value-of select="description" disable-output-escaping="yes"/>
  136.     </div>
  137.     <xsl:if test="category">
  138.         <div class="newsitemfooter">
  139.             <br/>Category: <b>
  140.                 <xsl:value-of select="category" disable-output-escaping="yes"/>
  141.             </b>
  142.         </div>
  143.     </xsl:if>
  144.     <xsl:if test="dc:subject">
  145.         <div class="newsitemfooter">
  146.     Subject: <b>
  147.                 <xsl:value-of select="dc:subject" disable-output-escaping="yes"/>
  148.             </b>
  149.         </div>
  150.     </xsl:if>
  151.     <xsl:if test="author">
  152.         <div class="newsitemfooter">
  153.     Author: <b>
  154.                 <xsl:value-of select="author" disable-output-escaping="yes"/>
  155.             </b>
  156.         </div>
  157.     </xsl:if>
  158.     <xsl:if test="comments">
  159.         <div class="newsitemfooter">
  160.             <a href="{comments}">[Comments]</a>
  161.         </div>
  162.     </xsl:if>
  163.     <xsl:if test="enclosure">
  164.         <div class="newsitemfooter">
  165.             <a href="{enclosure/@url}" title="{enclosure/@type} :   {enclosure/@url}"> [Enclosure : <xsl:value-of select="round( enclosure/@length div 1024 )"/> kB ]</a>
  166.         </div>
  167.     </xsl:if>
  168.     <xsl:if test="/newspaper/@type='newsitem'">
  169.         <div class="newsitemfooter">
  170.             <!-- 
  171.             Important: use 'source' element here so that source channel shows for 
  172.             newsbins and watches.  For other channels, FeedDemon sets the source
  173.             to the channel itself.
  174.             -->
  175.             Source: <a href="{source/@htmlUrl}">
  176.                 <xsl:value-of select="source" disable-output-escaping="yes"/>
  177.             </a>
  178.             |
  179.             <a href="{source/@url}">RSS</a>
  180.         </div>
  181.     </xsl:if>
  182. </xsl:template>
  183. <!-- channel  -->
  184. <xsl:template match="channel">
  185.     <xsl:variable name="chanlink" select="link"/>
  186.     <xsl:variable name="chantitle" select="title"/>
  187.     <div class="channel">
  188.         <div class="channeltitle">
  189.             <a href="{$chanlink}">
  190.                 <xsl:value-of select="title" disable-output-escaping="yes"/>
  191.             </a>
  192.         </div>
  193.         <div class="newsitembreak"/>
  194.         <xsl:for-each select="item">
  195.             <xsl:sort select="fd:sortKey" data-type="number" order="ascending"/>
  196.             <xsl:apply-templates select="."/>
  197.             <div class="newsitembreak"/>
  198.         </xsl:for-each>
  199.     </div>
  200. </xsl:template>
  201. <!-- channel/group newspaper -->
  202. <xsl:template match="newspaper[@type='group' or @type='channel']">
  203.     <html>
  204.         <head>
  205.             <title>Group/Channel Newspaper</title>
  206.             <base href="{//channel/link}" />
  207.             <xsl:copy-of select="$common-styles"/>
  208.         </head>
  209.         <body>
  210.             <center>
  211.                 <table class="filmstrip" border="0" cellspacing="0" cellpadding="0">
  212.                     <tbody>
  213.                         <tr>
  214.                             <td class="leftborder"></td>
  215.                             <td class="filmframes">
  216.                                 <div class="newsitembreak"/>
  217.                                 <xsl:if test="@type='group'">
  218.                                   <div class="newspapertitle">
  219.                                     <xsl:value-of select="title"/>
  220.                                 </div></xsl:if>
  221.                                 <xsl:for-each select="channel">
  222.                                     <div class="newsitembreak"/>
  223.                                     <xsl:apply-templates select="."/>
  224.                                 </xsl:for-each>
  225.                             </td>
  226.                             <td class="rightborder"></td>
  227.                         </tr>
  228.                     </tbody>
  229.                 </table>
  230.             </center>
  231.         </body>
  232.     </html>
  233. </xsl:template>
  234. <!-- single news item -->
  235. <xsl:template match="newspaper[@type='newsitem']">
  236.     <html>
  237.         <head>
  238.             <title>News Item</title>
  239.             <base href="{//item/link}" />
  240.             <xsl:copy-of select="$common-styles"/>
  241.         </head>
  242.         <body>
  243.             <center>
  244.                 <table class="filmstrip" border="0" cellspacing="0" cellpadding="0">
  245.                     <tbody>
  246.                         <tr>
  247.                             <td class="leftborder"></td>
  248.                             <td class="filmframes">
  249.                                 <div class="newspapertitle">
  250.                                     <xsl:value-of select="title"/>
  251.                                 </div>
  252.                                 <xsl:for-each select="channel/item">
  253.                                     <xsl:apply-templates select="."/>
  254.                                 </xsl:for-each>
  255.                                 <div class="newsitembreak"/>
  256.                             </td>
  257.                             <td class="rightborder"></td>
  258.                         </tr>
  259.                     </tbody>
  260.                 </table>
  261.             </center>
  262.         </body>
  263.     </html>
  264. </xsl:template>
  265. </xsl:stylesheet>
  266.